package one.stand.enums;

import java.util.Map;

/**
 * 1:名片，2:产品，3：官网,4:查看文章
 *
 * @author Administrator
 */
public enum SeeRecordEnums {
    CARD(1, "名片"),
    PRODUCT(2, "产品"),
    OFFICIAL_WEBSITE(3, "官网"),
    ARTICLE(4, "文章"),
    LEAD(5, "头条"),
    LIVE(6, "直播"),
    ;

    private Integer code;
    private String message;

    SeeRecordEnums(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    private static Map<Integer, SeeRecordEnums> map = EnumUtil.getEnumMap(values(), SeeRecordEnums::getCode);

    public static SeeRecordEnums getByCode(Integer code) {
        return map.get(code);
    }
}
